package com.ztom.beans.factory.support.registry

import com.ztom.beans.factory.support.pojo.BeanDefinition

/**
 * BeanDefinition 注册表
 *
 * @author ZhangTao
 */
interface BeanDefinitionRegistry {

    /**
     * 注册 bean definition
     */
    fun registerBeanDefinition(beanName: String, beanDefinition: BeanDefinition)

    /**
     * 根据 bean name 获取 bean definition
     */
    fun getBeanDefinition(beanName: String): BeanDefinition

    /**
     * 判断注册表是否包含 bean definition
     */
    fun containsBeanDefinition(beanName: String): Boolean

    /**
     * 获取定义的所有 bean name
     */
    fun getBeanDefinitionNames(): Array<String>
}